<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        function updateInput(){
            let val = document.querySelector("input");
            val.value= "通过value修改";
        }
        function updateTextarea(){
            val = document.querySelector("textarea");
            //val.innerHTML="通过innerHTML修改";
            val.value= "通过value修改";
        }
        function updateOption(){
            val = document.querySelector("#op1");
            //val.innerHTML="通过innerHTML修改";
            val.value= "通过value修改";
        }

    </script>
</head>
<body>
<div>
    <input type="text" name="input" value="45345"/>
    <textarea> 123123</textarea>
    <select>
        <option id="op1" value="one">1</option>
        <option id="op2" value="two">2</option>
        <option id="op3" value="three">3</option>
    </select>
</div>

<button onclick="updateInput()">点击更改input内容</button>
<button onclick="updateTextarea()">点击更改textarea内容</button>
<button onclick="updateOption()">点击更改option内容</button>
</body>
</html>